﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="BG_Admin.aspx.cs" Inherits="BG_Manage_BG_Admin" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="BG_CSS/Main.css" rel="stylesheet" type="text/css" />
    <title>添加管理员</title>
</head>

<body>
    <form id="form1" runat="server">
        <div>
            <!-- 顶部栏-->
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                    <td width="17" valign="top" background="BG_IMG/Main/mail_leftbg.gif">
                        <img src="BG_IMG/Main/left-top-right.gif" width="17" height="29" /></td>
                    <td valign="top" background="BG_IMG/Main/content-bg.gif">
                        <table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
                            <tr>
                                <td style="height: 31px">
                                    <div class="titlebt">管理员</div>
                                </td>
                            </tr>
                        </table>
                    </td>
                    <td width="16" valign="top" background="BG_IMG/Main/mail_rightbg.gif">
                        <img src="BG_IMG/Main/nav-right-bg.gif" width="16" height="29" /></td>
                </tr>
                <!-- 中部栏-->
                <tr>
                    <td valign="middle" background="BG_IMG/Main/mail_leftbg.gif" style="height: 19px">
                    </td>
                    <td valign="top" bgcolor="#F7F8F9" style="height: 19px">            
                        <div align="center">
                            <asp:Label ID="smslabel" runat="server" Width="100%" Font-Bold="True" Font-Size="Large" ForeColor="Red"></asp:Label>
                        </div>
                        <!--*********************************************************************************************--> 
                        <div class="showadd" align="center">
                            <asp:Panel ID="plList" runat="server" Width="100%">
                                <asp:GridView ID="GridView1" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                                    CellPadding="4" Width="80%" DataKeyNames="UserName" ForeColor="#333333" GridLines="None"
                                    OnRowCommand="GridView1_RowCommand" OnPageIndexChanging="GridView1_PageIndexChanging"
                                    PageSize="8" OnSorting="GridView1_Sorting" AllowSorting="True">
                                    <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                    <Columns>
                                        <asp:BoundField DataField="ID" HeaderText="ID" InsertVisible="False" ReadOnly="True" SortExpression="ID" />
                                        <asp:BoundField DataField="UserName" HeaderText="用户名" ReadOnly="True" SortExpression="UserName" />
                                        <asp:BoundField DataField="PassWord" HeaderText="密码" SortExpression="PassWord" />
                                        <asp:TemplateField HeaderText="操 作">
                                            <ItemTemplate>
                                                <asp:Button ID="btnEdit" runat="server" Text="编 辑" CausesValidation="False" CommandName="EditAdmin"
                                                    CommandArgument='<%#Eval("UserName") %>' />
                                                <asp:Button ID="btnDel" runat="server" Text="删 除" CausesValidation="False" CommandName="DeleteAdmin"
                                                    OnClientClick='return confirm("您真的要删除这条记录吗？")' CommandArgument='<%#Eval("UserName") %>' />
                                            </ItemTemplate>
                                            <ItemStyle HorizontalAlign="Center" />
                                        </asp:TemplateField>
                                    </Columns>
                                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
                                    <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                    <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                    <EditRowStyle BackColor="#999999" />
                                    <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
                                </asp:GridView>
                            </asp:Panel>
                        </div>
                        <br /><br />
                        <!--*********************************************************************************************-->
                        <!--管理员添加/修改板块 -->         <!--管理员添加/修改板块 -->          <!--管理员添加/修改板块 -->
                        <!--*********************************************************************************************-->
                        <div class="adminadd" style="text-align: center">
                            <asp:Panel ID="plEdit" runat="server" Width="100%">
                                <table border="0" cellpadding="0" cellspacing="0" style="width: 80%">
                                    <tr>
                                        <td style="background-color: #5d7b9d; height: 30px; color: white;" align="center" colspan="3">
                                            <strong>
                                                <asp:Label ID="labshow" runat="server" Text="添加管理员 "></asp:Label></strong></td>
                                    </tr>
                                    <tr>
                                        <td style="width: 150px; height: 38px;" align="right">
                                            用 户 名：
                                        </td>
                                        <td style="width: 100px; font-size: larger; height: 38px;" align="center">
                                            <input id="txtUserName" type="text" maxlength="100" name="txtUserName" runat="server" style="width: 200px">
                                        </td>
                                        <td style="width: 100px; height: 38px;" align="center">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*请输入用户名！" Width="200px" ControlToValidate="txtUserName"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtUserName"
                                                ErrorMessage="不能使用'和空格" ValidationExpression="[^' ]+" Width="200px"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 150px; height: 38px;" align="right">
                                            密 &nbsp; &nbsp; &nbsp;&nbsp; 码：
                                        </td>
                                        <td style="width: 100px; font-size: larger; height: 38px;" align="center">
                                            <input id="txtPWD" type="password" maxlength="100" name="txtPWD" runat="server" style="width: 200px">
                                        </td>
                                        <td style="width: 100px; height: 38px;" align="center">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtPWD"
                                                ErrorMessage="*请输入密码！" Width="200px"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtPWD"
                                                ErrorMessage="不能使用'和空格" ValidationExpression="[^' ]+" Width="200px"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 150px" align="right">
                                            确认密码：
                                        </td>
                                        <td style="width: 100px; font-size: larger;" align="center">
                                            <input id="txtPWDOK" type="password" maxlength="100" name="txtPWDOK" runat="server" style="width: 200px" />
                                        </td>
                                        <td style="width: 100px" align="center">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtPWDOK"
                                                ErrorMessage="*请输入确认密码！" Width="200px"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="txtPWDOK"
                                                ErrorMessage="不能使用'和空格" ValidationExpression="[^' ]+" Width="200px"></asp:RegularExpressionValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="3">
                                            <asp:CompareValidator ID="CompareValidator3" runat="server" ControlToCompare="txtPWD"
                                                ControlToValidate="txtPWDOK" Display="Dynamic" EnableClientScript="false" ErrorMessage="用户密码与确认密码不同<br>"
                                                Type="String" Width="200px"> 
                                            </asp:CompareValidator>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td align="center" colspan="3">
                                            <asp:Button ID="btnAdd" runat="server" Text="· 添加 ·" OnClick="btnAdd_Click" />&nbsp;&nbsp;
                                            <asp:Button ID="btnReset" runat="server" Text="· 重置 ·" OnClick="btnReset_Click" />
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </div>
                       <!--*********************************************************************************************-->

                    </td>
                    <td background="BG_IMG/Main/mail_rightbg.gif" style="height: 19px">
                    </td>
                </tr>
                <!-- 底部栏-->
                <tr>
                    <td valign="bottom" background="BG_IMG/Main/mail_leftbg.gif">
                        <img src="BG_IMG/Main/buttom_left2.gif" width="17" height="17" /></td>
                    <td background="BG_IMG/Main/buttom_bgs.gif">
                        <img src="BG_IMG/Main/buttom_bgs.gif" width="17" height="17"></td>
                    <td valign="bottom" background="BG_IMG/Main/mail_rightbg.gif">
                        <img src="BG_IMG/Main/buttom_right2.gif" width="16" height="17" /></td>
                </tr>
            </table>
        </div>
    </form>
</body>
</html>
